package org.demo.five;
/**
 * 
 * @author  
 * @date    2010-10-24
 * @file    org.demo.five.Person.java
 */
public class Person implements java.io.Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public Person(String fn,String ln,int a,Gender g){
        this.firstName = fn;
        this.lastName = ln;
        this.age = a;
        this.gender = g;
    }
    public String getFirstName(){return firstName;}
    public String getlastName(){return lastName;}
    public int getAge(){return age;}
    public Gender getGender(){return gender;}
    public Person getSpouse(){return spouse;}
    
    public void setFirstName(String value){firstName = value;}
    public void setLastName(String value){lastName = value;}
    public void setAge(int value){age = value;}
    public void setGender(Gender value){gender = value;}
    public void setSpouse(Person value){spouse = value;}
    
    public String toString(){
        return "[Person: firstName=" + firstName
        + " lastName=" + lastName
        + " age=" + age
        + " gender=" + gender
        + " spouse=" + spouse.getFirstName()
        + "]";
    }
    
    private String firstName;
    private String lastName;
    private int age;
    private Gender gender;
    private Person spouse;
}
enum Gender{MALE,FEMALE}